package com.lh.portal.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import com.lh.mapper.PicMapper;
import com.lh.pojo.Pic;
import com.lh.portal.service.IPicService;

@Service
public class PicServiceImpl implements IPicService{
	
	@Value("${pic.Path}")
	String realPath;
	
	@Autowired
	PicMapper picMapper;
	
	@Override
	public List<Pic> findAllPics() {
		List<Pic> list = picMapper.findAlls();
		for (Pic pic : list) {
			pic.setPath(realPath+pic.getPath());
		}
		return list;
	}

}
